<style>
thead tr th{font-size: 13px; text-align: center !important;}
td{font-size: 14px; text-align: center !important;}
</style>
<form class="form-horizontal" id="popup-validation" enctype="multipart/form-data" method="post">
<div class="col-lg-12">
	<div class="panel panel-default">
		<div class="panel-heading">
			បញ្ចីខេត្ត ក្រុង / List Location			
			<div style="float: right; margin-top: -5px;">				
				<?php $add_url = $this->url(array('module'=>'locations','controller'=>'index','action'=>'add-location'));?>
				<a href="<?php echo $add_url;?>">
					<button type="button" class="btn btn-primary btn-sm btn-grad"><i class="icon-plus-sign"></i> បន្ថែមថ្មី​  </button>					
				</a>
				<button type="submit" name="update" class="btn btn-primary btn-sm btn-grad"><i class="icon-edit"></i> កែប្រែ ​ </button>
				<button type="submit" name="delete"​​ class="btn btn-danger btn-sm btn-grad"><i class="icon-remove-sign"></i> លុបចោល​​ ​ </button>
			</div>			
		</div>
		<div class="panel-body">
 			<div class="table-responsive">
				<table class="table table-striped table-bordered table-hover" id="dataTables-example">
					<thead>
						<tr>
							<th>ល.រ</th>
                        	<th>ប្រអប់</th>
                            <th>ឈ្មោះខេត្តក្រុង / Location Name</th>
                        	<th>ស្ដានការ</th>
                        	<th>កែប្រៃ</th>
                        	<th>លុបចោល</th>
                       </tr>
                  	</thead>
                    <tbody>
                    <?php $i = 1;?>
                    <?php foreach($this->location as $data){?>
                    	<tr class="odd gradeX">
                    		<td><?php echo $i++;?></td>
                        	<td><span class=""><input class="uniform" name="checkBox" value="<?php echo $data['location_id'];?>" type="checkbox"></span></td>
                        	<td><?php echo $data['location_name'];?></td>
                        	<td>
                        		<?php if($data['status']== 1){?>
                        		<button type="submit" name="status" value="<?php echo $data['user_id'];?>" class="btn btn-primary btn-sm btn-grad"><i class="icon-off"></i></button>
                        		<?php }else {?>
                        		<button type="submit" name="unstatus"  value="<?php echo $data['user_id'];?>" class="btn btn-danger btn-sm btn-grad" ><i class="icon-off"></i></button>
                        		<?php }?>
                        	</td>
                       		<td class="center">
                       			<?php $edit_url = $this->url(array('module'=>'locations','controller'=>'index','action'=>'edit-location'));?>                       		
                       			<a href="<?php echo $edit_url?>/id/<?php echo $data['location_id'];?>"><button type="button" class="btn btn-primary btn-xs btn-grad"><i class="icon-pencil icon-white"></i> កែប្រែ</button></a>
                       		</td>
                        	<td class="center">
                        		<?php $delete_url = $this->url(array('module'=>'locations','controller'=>'index','action'=>'delete-location'));?>
                        		<a href="<?php echo $delete_url?>/id/<?php echo $data['location_id'];?>"><button type="button" class="btn btn-danger btn-xs btn-grad"><i class="icon-remove icon-white"></i>​ លុបចោល</button></a>
                        	</td>
                   		</tr>
                    <?php } ?>                   
               		</tbody>
  				</table>
 			</div>
		</div>
	</div>
</div>
</form>